package com.service.impl;

import com.dao.UserDao;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("userService")// 声明为Spring Bean
public class UserServiceImpl implements UserService{
        @Autowired// 自动将UserDao实例化userDao中
        UserDao userDao;
        @Override
        public boolean login(String name, String password) {
            return userDao.login(name, password);
        }

}
